import { createApp } from 'vue'
// import './style.css'
import App from '@/App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// @ts-expect-error 汉化下
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import router from './router'
import pinia from './store'

const app = createApp(App)

app.use(ElementPlus, {
  locale: zhCn,
})
// svg插件需要配置代码
import 'virtual:svg-icons-register'
console.log(import.meta.env)

// 全局注册svgIcon
// import SvgIcon from '@/components/SvgIcon/index.vue'
// app.component('SvgIcon', SvgIcon)

// 安装自定义插件
import globalComponent from '@/components'
console.log(globalComponent)

// 测试mock假接口
import axios from 'axios'
// axios({
//   url: '/api/user/login',
//   method: 'post',
//   data: {
//     username: 'admin',
//     password: '123456',
//   },
// })

app.use(globalComponent)
app.use(router)
app.use(pinia)

app.mount('#app')
